/**
 * <copyright>
 * </copyright>
 *
 * $Id: EusecaseFactoryImpl.java 483 2007-04-03 03:07:06Z petterei $
 */
package biz.modelx.precise.usecase.ui.model.eusecase.impl;

import biz.modelx.precise.usecase.ui.model.eusecase.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class EusecaseFactoryImpl extends EFactoryImpl implements EusecaseFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static EusecaseFactory init() {
		try {
			EusecaseFactory theEusecaseFactory = (EusecaseFactory)EPackage.Registry.INSTANCE.getEFactory("biz.modelx.precise.usecase.ui.model"); 
			if (theEusecaseFactory != null) {
				return theEusecaseFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new EusecaseFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EusecaseFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case EusecasePackage.USECASE_MODEL: return createUsecaseModel();
			case EusecasePackage.ACTOR: return createActor();
			case EusecasePackage.USECASE: return createUsecase();
			case EusecasePackage.SYSTEM_BOUNDERY: return createSystemBoundery();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UsecaseModel createUsecaseModel() {
		UsecaseModelImpl usecaseModel = new UsecaseModelImpl();
		return usecaseModel;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Actor createActor() {
		ActorImpl actor = new ActorImpl();
		return actor;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Usecase createUsecase() {
		UsecaseImpl usecase = new UsecaseImpl();
		return usecase;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SystemBoundery createSystemBoundery() {
		SystemBounderyImpl systemBoundery = new SystemBounderyImpl();
		return systemBoundery;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EusecasePackage getEusecasePackage() {
		return (EusecasePackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static EusecasePackage getPackage() {
		return EusecasePackage.eINSTANCE;
	}

} //EusecaseFactoryImpl
